<script setup lang="ts">
	// --组合式 API 模板
	import { ref } from 'vue'
	import {
		onLoad,
		onShow,
	} from "@dcloudio/uni-app";

	const title = ref<string>("标题")
	const isShow = ref<boolean>(false)
	// onLoad 接受 A 页面传递的参数
	onLoad((option) => {
		console.log("B 页面 onLoad:", option); //B 页面 onLoad: {id: '1', name: 'uniapp'}
	});

	onShow(() => {
		console.log("B 页面 onShow");
	});

	const change = (e) => {
		console.log(e)
		isShow.value = e == 'open' ? true : false;
	}
	const add = () => {
		console.log("新增")
		isShow.value = true;
	}
</script>
<template>
	<view class="page-container">
		<use-navbar ref="navbar" type="custom" :show="true" :back="false" :title="''">
			<template v-slot:title>
				<view class="tac">
					<text class="fs-34 fwbd ft-white">日历</text>
				</view>
			</template>
			<template v-slot:right>
				<view class="tac trophy" @click=''>

				</view>
			</template>
		</use-navbar>
		<view class="calendar">
			<uni-calendar :insert="true" :lunar="true" :start-date="'2019-3-2'" :end-date="'2019-5-20'"
				@change="change" />
		</view>
		<view class="" style="height: 25px;"></view>
		<view class=" border margin-lr border-radius-sm padding-tb-xs padding-lr-sm">
			<view class="tit dflex-b">
				<text class="fwbd">对面楼的围棋课</text>
				<text>16:00</text>
			</view>
			<view class="tips padding-lr-sm bg-dark border-radius-sm margin-tb-sm">
				<text class="fs-23"> 注：下次课上有比赛，记得带...</text>
			</view>
		</view>
		<use-popup mode="bottom" bgclass=" " v-model="isShow" :close-icon="true" :show="isShow" @open="change('open')"
			@close="change('close')">
			<view class="border-radius-top30 bg-popup safe-area-inset-bottom ">
				<view class="tac w-full padding-sm">
					<text>新建事项</text>
				</view>
				<view class="padding-lr margin-bottom-xl dflex-b pos-r" style="min-height: 25vh;">
					呵呵呵
				</view>
				<view class="padding-lr padding-tb cool-button">
					<view class="margin-top-xl tac w-full border-radius-lg padding-tb-sm btn blue rounded" @click.stop="">
						确定
					</view>
				</view>
			</view>
		</use-popup>
		<view class="use-fab dflex-b">
			<view class="btn border-radius-big margin-right-xs tac" style="background-color: #33b8cc;">
				<text class="fs-34 fwbd700">今</text>
			</view>
			<view class="btn border-radius-big margin-left-xs tac" @click="add" style="background-color: #8a8a8a;">
				<text class="fs-70 fwbd700">+</text>
			</view>
		</view>
		<use-tabbar tabbarIndex=1></use-tabbar>
	</view>
</template>



<style lang="less" scoped>
	
</style>